package io;


import java.io.*;

public class OOSDemo {
    public static void main(String[] args) throws IOException {
        String name = "郭仔";
        int age = 20;
        String gender = "女";
        String[] otherInfo = {"美女","女神","我呸"};
        Person person = new Person(name,age,gender,otherInfo);

        FileOutputStream fos = new FileOutputStream("person.obj");
        ObjectOutputStream oos = new ObjectOutputStream(fos);
        oos.writeObject(person);
        System.out.println("写出完毕");
        oos.close();
    }
}
